package com.fjw.service.impl;

import com.fjw.pojo.Store;
import com.fjw.pojo.User;
import com.fjw.service.StoreService;
import com.fjw.mapper.StoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StoreServiceImpl implements StoreService {
    @Autowired
    private StoreMapper storeMapper;

    @Override
    public List<Store> getAll () {
       return storeMapper.getAll();
    }

    @Override
    public Store findById(Integer id) { // 修正返回类型
        return storeMapper.findById(id);
    }

    @Override
    public void add(Store store) {
        storeMapper.add(store);
    }

    @Override
    public void updateById(Store store) {
        storeMapper.updateById(store);
    }

    @Override
    public void deleteById(Integer id) {
        storeMapper.deleteById(id);
    }

    @Override
    public List<User> getAdminUsers() {
        return storeMapper.getAdminUsers();
    }
}
